<template>
    <div id="community">
        <el-table :data="detail" height="250" style="width: 100%" >
        <el-table-column prop="no" label="序号" />
        <el-table-column prop="username" label="用户名" />
        <el-table-column prop="name" label="姓名" />
        <el-table-column prop="gender" label="性别" />
        <el-table-column prop="age" label="年龄" />
        <el-table-column prop="job" label="职业" />
        <el-table-column prop="phone" label="手机号"/>
        <el-table-column prop="comminunity" label="所属社区" />
        </el-table>
    </div>
</template>

<script>
export default {
    data(){
        return{
            detail:[{}]
        }
    },
    mounted(){
        this.$axios({
          method: "post",
          url: "http://localhost:8080/nav/tylir/communitytwo",
          data:this.$qs.stringify({userCommunity:this.$store.state.user.userCommunity})
        }).then(res => {
            console.log(res.data);
            this.persons = res.data;
            if(res.data.code == 1){
              this.detail = res.data.data;
            }else{
              console.log("error");
            }
        })
    }
}
</script>

<style scoped>

</style>